(ns CurrentBusinessLogic)

(defn main_profit_ratio
  "Calculates main profit ratio, which gives us relations between gained profit and invested assets" 
  [profit TotalCapital]
  (double (/ profit TotalCapital)))

(defn aditionalSales_ratio
  "Calculates additional ratio, by which user can have better view in companies profit rate- koeficijent obrta"
  [salesIncome totalAssets]
  (double (/ salesIncome totalAssets)))

(defn liquidityRatio_current
  "Assesses liquidity of current assets of the company, within months lifecycle. Should be within [1.8 - 2.0]"
  [currentAssets currentLiabilities]
  (double (/ currentAssets currentLiabilities)))


(defn liquidityRatio_fast
  "Assesses liquidity of current assets (minus supplies) of the company, within weeks lifecycle. Should be within [0.8 - 1.0]"
  [currentAssets supplies currentLiabilities]
  (double (/ (- currentAssets supplies) currentLiabilities)))
